package com.prawn.predict.client;

import com.prawn.predict.client.impl.DataRecordClientImpl;
import com.prawn.predict.pojo.DataRecord;
import entity.PageResult;
import entity.Result;
import entity.StatusCode;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * @Auther: zhy
 * @Date: 2019/7/25
 * @Description: 采集数据查询服务调用
 */
@FeignClient(value = "prawn-ift-datasearch",fallback = DataRecordClientImpl.class)
public interface DataRecordClient {

    /**
     * 分页+多条件查询——预测使用接口
     * @param searchMap 查询条件封装
     * @param page 页码
     * @param size 页大小
     * @return 分页结果
     */
    @RequestMapping(value="/dataRecord/searchforpredict/{page}/{size}",method= RequestMethod.POST)
    public PageResult<DataRecord> findSearch(@RequestBody Map searchMap , @PathVariable("page") int page, @PathVariable("size") int size);
}
